#include <stdio.h>
int main(){
	int n;
	float sum = 0;
	scanf("%d",&n);
	if(n<=50&&n>=0){
		sum = n*0.53;
	}
	else if(n<0){
		printf("Invalid Value!");
	}
	else{
		sum = 50*0.53+(n-50)*0.58;
	}printf("cost = %.2f",sum);
	return 0;
}
 
